package org.jeecg.modules.PriceSystemModule.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.PriceSystemModule.entity.PriceInervalEntity;
import org.jeecg.modules.PriceSystemModule.entity.PriceSystemEntity;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Component
public interface TechnologyCostManageMapper {
    /**
     * 成本管理中
     * @param page
     * @param category
     * @param businessType
     * @param sysuserId
     * @return
     */
    IPage<PriceSystemEntity> getCostManageList(Page<PriceSystemEntity> page, @Param("category") Integer category,@Param("businessType") Integer businessType,@Param("sysuserId") String sysuserId);

    /**
     * 查询工厂的价格体系区间
     * @param pricesystemFactoryId
     * @return
     */
    List<PriceInervalEntity> getcostInervallist(@Param("pricesystemFactoryId") String pricesystemFactoryId);

    //删除成本阶梯数据
    int deletecostInerval(@Param("id") int id);

    //查询这个成本区间之前是否已经存在
    String costInervaloldcz(@Param("pricesystemFactoryId") String pricesystemFactoryId,@Param("minNumbers") int minNumbers,@Param("maxNumbers") int maxNumbers);

    int addcostInerval(PriceInervalEntity entity);

    //修改工厂的价格体系表的状态
    void updatestatus(@Param("pricesystemFactoryId") String pricesystemFactoryId);

    //查询所有的子类工艺
    List<Map<String, String>> getallsongongyi();


    int addcostSystem(@Param("gongyi") String gongyi,@Param("category") String category,@Param("date") Date date,@Param("sysuserId") String sysuserId,@Param("businessType") int businessType);

    //查询这个供应商的这个工艺是否已经设置过
    int getsysgongyicost(@Param("gongyi") String gongyi,@Param("sysuserId") String sysuserId);

    List<PriceInervalEntity> getPriceInervalEntitylist(@Param("pricesystemFactoryId") String pricesystemFactoryId);
}
